<?php
	include_once('header.php');
	include_once('menu.php');
	include_once('content.php');
?> 
<?php
	 	echo form_open('Search/search', array('class'=>'jNice', 'method'=>'get'));
			echo form_fieldset();
			echo '<p>';
			$nastavenie = array('name'=>'search','style'=>'display: inline; float: left;');
			echo form_hidden('menotabulky', 'people');
			echo form_input($nastavenie);
			echo form_submit('submit', 'Hľadať').'</p>';
			echo form_fieldset_close(); 
		echo form_close();
	 ?>
<h3>Zoznam ľudí</h3>
<table cellpadding="0" cellspacing="0">
<?php
foreach ($people as $key => $obj) {
?>

<tr>
    <td><?php echo anchor('people/ukaz/'.$obj['person_id'], $obj['surname'].' '.$obj['name']); ?></td>
    <td class="action">
    	<?php
    	 if($this->session->userdata('logged_in') && $this->session->userdata('admin')){
    	 	echo anchor('people/upgrade/'.$obj['person_id'],'Zmeň',array('class'=>'edit'));
		 } 
    	?>
    	&nbsp;
    </td>
</tr>

<?php
} //end foreach

?>
</table>

<?php echo $this->pagination->create_links(); ?>



<?php
	include_once('footer.php');
?>